/*qq 2219077542 QQ群 4607221*/
/*时间 Wed Feb 10 2021 14:18:15 GMT+0800 (CST)*/
/*测试环境 oppo a5 安卓8 autojs 4.1.1*/
//能在vscode看到日志,但在autojs的日志看不到
vsCodeLog("hello世界123")
function vsCodeLog(str){
    function getPrivateField(javaObject,key){
        var field=javaObject.class.getDeclaredField(key)
        field.setAccessible(true)
        return field.get(javaObject)
    }
    var s=org.autojs.autojs.pluginclient.DevPluginService.getInstance()
    var mWebSocket=getPrivateField(getPrivateField(s,"mSocket"),"mWebSocket")
    mWebSocket.send('{"type":"log","data":{"log":"'+str+'"}}')
}